package org.dromara.tearoom.domain.vo;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.tearoom.domain.TerGroupBuy;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;



/**
 * 团购核销视图对象 ter_group_buy
 *
 * @author ckj
 * @date 2025-05-08
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = TerGroupBuy.class)
public class TerGroupBuyVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @ExcelProperty(value = "ID")
    private Long id;

    /**
     * 关联ID
     */
    @ExcelProperty(value = "关联ID")
    private Long relateId;

    /**
     * 关联类型
     */
    @ExcelProperty(value = "关联类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "ter_group_buy_relate_type")
    private Integer relateType;

    /**
     * 名称
     */
    @ExcelProperty(value = "名称")
    private String name;

    /**
     * 券码
     */
    private String code;

    /**
     * 加密券码
     */
    private String encryptedCode;

    /**
     * 用户编号
     */
    @ExcelProperty(value = "用户编号")
    private Long userId;

    /**
     * 用户昵称
     */
    @ExcelProperty(value = "用户昵称")
    @Translation(type = TransConstant.MEMBER_USER_ID_TO_NAME, mapper = "userId")
    private String userName;

    /**
     * 用户手机号
     */
    @ExcelProperty(value = "用户手机号")
    @Translation(type = TransConstant.MEMBER_USER_ID_TO_MOBILE, mapper = "userId")
    private String userMobile;

    /**
     * 商户ID
     */
    @ExcelProperty(value = "商户ID")
    private String accountId;

    /**
     * 券的状态
     */
    @ExcelProperty(value = "券的状态")
    private Integer status;

    /**
     * 原价,单位分
     */
    @ExcelProperty(value = "原价,单位分")
    private Integer originalAmount;

    /**
     * 实付金额,单位分
     */
    @ExcelProperty(value = "实付金额,单位分")
    private Integer payAmount;

    /**
     * 券码有效期（开始时间）
     */
    @ExcelProperty(value = "券码有效期", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "开=始时间")
    private Date startTime;

    /**
     * 券码有效期（结束时间）
     */
    @ExcelProperty(value = "券码有效期", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "结=束时间")
    private Date expireTime;

    /**
     * 使用时间
     */
    @ExcelProperty(value = "使用时间")
    private Date useTime;

    /**
     * 团购类型
     */
    @ExcelProperty(value = "团购类型")
    private Integer type;

    /**
     * 平台类型1-自营2-美团3-抖音4-快手
     */
    @ExcelProperty(value = "平台类型1-自营2-美团3-抖音4-快手")
    private Integer plateType;

    /**
     * 平台订单ID
     */
    private String plateOrderId;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 创建时间
     */
    private Date createTime;


}
